package gameserver;

/**
 * Contains global information
 * used to indicate server state.
 */
public class SGSGlobal {
    public static final int OFF = 2; // server is completely off, waiting to start
    public static final int STARTING = 3; // server is starting
    public static final int ON = 4; // server is on and running

    public static final int ENDED = 10; // server has completely shut down, end everything

    public static final int FATAL_ERROR = 0; // server encountered an error, must close
    public static final int NONFATAL_ERROR = 1; // server encountered an error but can recover


    public static String getModeString(int mode) {
        switch (mode) {
            case OFF: return "OFF";
            case STARTING: return "STARTING";
            case ON: return "ON";
            case ENDED: return "ENDED";
            case FATAL_ERROR: return "FATAL_ERROR";
            case NONFATAL_ERROR: return "NONFATAL_ERROR";
            default: return "UNKOWN MODE";
        }
    }
}
